package me.maiz.tool.codemonitor.common;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class LayUIResult<T> {
    private int code;
    private String msg;
    private int count;
    private List<T> data;

    public static LayUIResult success(){
        return new LayUIResult(0,"成功",0,null);
    }

    public static LayUIResult fail(String msg){
        return new LayUIResult(-1,msg,0,null);
    }
}
